package com.dp.clone;

import org.junit.Test;

public class Client {

	@Test
	public void cloneTest() throws CloneNotSupportedException {
		/*
		 * A a=new A(); A acopy=a.clone(); System.out.println(a);
		 * System.out.println(acopy); acopy.display();
		 * System.out.println(a==acopy?"same":"not same");
		 */

		A a = new A();
		B b = new B();
		b.setA(a);
		b.setAge(11);

		B c = b.clone();
		c.getA().display();

	}

}
